/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fi.uba.algo3.tp3.modelo.contenedor;

import fi.uba.algo3.tp3.modelo.inanimados.Obstaculo;
import fi.uba.algo3.tp3.modelo.inanimados.ObstaculoFijo;
import fi.uba.algo3.tp3.modelo.inanimados.ObstaculoPared;

/**
 *
 * @author arrodriguez
 */
public class JaulaBean extends ObstaculoFijo {

    public JaulaBean(Integer posX, Integer posY) {
        super(posX, posY);
    }

    @Override
    public void generarObstaculos() {
        for (int i = posX; i <= Ancho; i++) {
            Obstaculo obstaculo = new ObstaculoPared(i, posY);
            obstaculos.add(obstaculo);
        }
        for (int i = posX + Ancho; i <= Alto; i++) {
            Obstaculo obstaculo = new ObstaculoPared(posX, i);
            obstaculos.add(obstaculo);
        }
        for (int i = posY; i <= Alto; i++) {
            Obstaculo obstaculo = new ObstaculoPared(posX, i);
            obstaculos.add(obstaculo);
        }
        for (int i = posY + Alto; i <= Ancho; i++) {
            Obstaculo obstaculo = new ObstaculoPared(i, posY);
            obstaculos.add(obstaculo);
        }
    }


}
